package com.mtsmda.chapter3.arrayEx;

import java.util.Random;

import com.mtsmda.chapter3.arrayEx.sort.Sorter;

public class ArrayEx {

	public static void main(String[] args) {
		int[] g = new int[15];
		int[] s = new int[15];
		for (int i = 0; i < g.length; i++) {
			g[i] = (int)(Math.random() * 100);
			s[i] = (int)(Math.random() * 100);
		}
		System.out.println("Buble sort");
		for (int i : g) {
			System.out.print(i + " ");
		}
		System.out.println();

		System.out.println("selectSort");
		for (int i : s) {
			System.out.print(i + " ");
		}
		System.out.println();
		
		Sorter sorter = new Sorter(g);
		int [] bubleSort = sorter.bubleSort();
		System.out.println("Buble sort");
		for (int i : bubleSort) {
			System.out.print(i + " ");
		}
		System.out.println();
		
		int[] selectSort = sorter.selectSort();
		
		System.out.println("selectSort");
		for (int i : selectSort) {
			System.out.print(i + " ");
		}
		System.out.println();
		
	}

}